#include "pinyin_com.h"

int main(int argc, char *argv[]) {
    gtk_init(&argc, &argv);
    
    InputContext ctx;
    init_input_context(&ctx);
    create_main_window(&ctx);
    
    // 连接窗口关闭信号
    g_signal_connect(ctx.window, "destroy", G_CALLBACK(gtk_main_quit), NULL);
    g_signal_connect(ctx.keyboard_window, "destroy", G_CALLBACK(gtk_main_quit), NULL);
    
    gtk_widget_show_all(ctx.window);
    gtk_main();
    return 0;
}